package com.deliinsns.app.employer;
import java.util.List;
import org.springframework.util.CollectionUtils;
import com.deliinsns.app.employer.bean.Employer;
import com.deliinsns.sys.BasicDao;
public class EmployerDao extends BasicDao<Employer> {

	public Employer getByUsername(String name) {
		 Employer employer= null;
		 List<Employer> list= this.findByHql("from Employer t where t.username =?",name);
		 if(!CollectionUtils.isEmpty(list)){
			 employer=  list.get(0);
		 }
		 return employer;
	}
	public Employer getById(String id) {
		return this.get(Employer.class, id);
	}
	
}
